//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.ruoyi.live.base.domain.vo;


import com.ruoyi.live.base.domain.LivePaperImportProductDetail;

import java.util.List;

public class ImportDetail {
    private Integer type;
    private List<LivePaperImportProductDetail> details;
    private Integer state;
    private String error;
    private String header;
    private String path;
    private Integer section;
    private Integer first;
    private Integer answer;

    public ImportDetail(Integer type, List<LivePaperImportProductDetail> details, Integer state, String error) {
        this.type = type;
        this.details = details;
        this.state = state;
        this.error = error;
    }

    public ImportDetail(Integer type, String path, List<LivePaperImportProductDetail> details, Integer count, Integer first, Integer answer, Integer section) {
        Boolean state = details.size() >= count;
        String header = this.getErrStr(type);
        String err = header + "默认数量为" + count + "当前数量为" + details.size() + ",请补充";
        this.type = type;
        this.details = details;
        this.error = err;
        this.state = state ? 1 : 2;
        this.header = header;
//        this.path = this.getUrlPath(type);
        this.path = path;
        this.first = first;
        this.section = section;
        this.answer = answer;
    }

    public String getErrStr(Integer type) {
        switch(type) {
            case 1:
                return "弹幕问题";
            case 2:
                return "商品主图首图";
            case 3:
                return "商品主图非首图";
            case 4:
                return "商品主图干扰图";
            case 5:
                return "商品属性图";
            case 6:
                return "商品特点图";
            case 7:
                return "商品整体图";
            case 8:
                return "商品特写图";
            case 9:
                return "配送说明图";
            case 10:
                return "售后说明图";
            case 11:
                return "详情图干扰图";
            default:
                return "";
        }
    }

    public static String relativePath(Integer type) {
        switch(type) {
            case 2:
                return "主图/商品首图/";
            case 3:
                return "主图/商品图/";
            case 4:
                return "主图/干扰图/";
            case 5:
                return "详情图/属性图/";
            case 6:
                return "详情图/特点图/";
            case 7:
                return "详情图/整体图/";
            case 8:
                return "详情图/特写图/";
            case 9:
                return "详情图/配送说明图/";
            case 10:
                return "详情图/售后说明图/";
            case 11:
                return "详情图/干扰图/";
            default:
                return "";
        }
    }

    public Integer getType() {
        return this.type;
    }

    public List<LivePaperImportProductDetail> getDetails() {
        return this.details;
    }

    public Integer getState() {
        return this.state;
    }

    public String getError() {
        return this.error;
    }

    public String getHeader() {
        return this.header;
    }

    public String getPath() {
        return this.path;
    }

    public Integer getSection() {
        return this.section;
    }

    public Integer getFirst() {
        return this.first;
    }

    public Integer getAnswer() {
        return this.answer;
    }

    public ImportDetail setType(final Integer type) {
        this.type = type;
        return this;
    }

    public ImportDetail setDetails(final List<LivePaperImportProductDetail> details) {
        this.details = details;
        return this;
    }

    public ImportDetail setState(final Integer state) {
        this.state = state;
        return this;
    }

    public ImportDetail setError(final String error) {
        this.error = error;
        return this;
    }

    public ImportDetail setHeader(final String header) {
        this.header = header;
        return this;
    }

    public ImportDetail setPath(final String path) {
        this.path = path;
        return this;
    }

    public ImportDetail setSection(final Integer section) {
        this.section = section;
        return this;
    }

    public ImportDetail setFirst(final Integer first) {
        this.first = first;
        return this;
    }

    public ImportDetail setAnswer(final Integer answer) {
        this.answer = answer;
        return this;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof ImportDetail)) {
            return false;
        } else {
            ImportDetail other = (ImportDetail)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label119: {
                    Object this$type = this.getType();
                    Object other$type = other.getType();
                    if (this$type == null) {
                        if (other$type == null) {
                            break label119;
                        }
                    } else if (this$type.equals(other$type)) {
                        break label119;
                    }

                    return false;
                }

                Object this$details = this.getDetails();
                Object other$details = other.getDetails();
                if (this$details == null) {
                    if (other$details != null) {
                        return false;
                    }
                } else if (!this$details.equals(other$details)) {
                    return false;
                }

                label105: {
                    Object this$state = this.getState();
                    Object other$state = other.getState();
                    if (this$state == null) {
                        if (other$state == null) {
                            break label105;
                        }
                    } else if (this$state.equals(other$state)) {
                        break label105;
                    }

                    return false;
                }

                Object this$error = this.getError();
                Object other$error = other.getError();
                if (this$error == null) {
                    if (other$error != null) {
                        return false;
                    }
                } else if (!this$error.equals(other$error)) {
                    return false;
                }

                label91: {
                    Object this$header = this.getHeader();
                    Object other$header = other.getHeader();
                    if (this$header == null) {
                        if (other$header == null) {
                            break label91;
                        }
                    } else if (this$header.equals(other$header)) {
                        break label91;
                    }

                    return false;
                }

                Object this$path = this.getPath();
                Object other$path = other.getPath();
                if (this$path == null) {
                    if (other$path != null) {
                        return false;
                    }
                } else if (!this$path.equals(other$path)) {
                    return false;
                }

                label77: {
                    Object this$section = this.getSection();
                    Object other$section = other.getSection();
                    if (this$section == null) {
                        if (other$section == null) {
                            break label77;
                        }
                    } else if (this$section.equals(other$section)) {
                        break label77;
                    }

                    return false;
                }

                label70: {
                    Object this$first = this.getFirst();
                    Object other$first = other.getFirst();
                    if (this$first == null) {
                        if (other$first == null) {
                            break label70;
                        }
                    } else if (this$first.equals(other$first)) {
                        break label70;
                    }

                    return false;
                }

                Object this$answer = this.getAnswer();
                Object other$answer = other.getAnswer();
                if (this$answer == null) {
                    if (other$answer != null) {
                        return false;
                    }
                } else if (!this$answer.equals(other$answer)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof ImportDetail;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $type = this.getType();
        int result1 = result * 59 + ($type == null ? 43 : $type.hashCode());
        Object $details = this.getDetails();
        result1 = result * 59 + ($details == null ? 43 : $details.hashCode());
        Object $state = this.getState();
        result1 = result * 59 + ($state == null ? 43 : $state.hashCode());
        Object $error = this.getError();
        result1 = result * 59 + ($error == null ? 43 : $error.hashCode());
        Object $header = this.getHeader();
        result1 = result * 59 + ($header == null ? 43 : $header.hashCode());
        Object $path = this.getPath();
        result1 = result * 59 + ($path == null ? 43 : $path.hashCode());
        Object $section = this.getSection();
        result1 = result * 59 + ($section == null ? 43 : $section.hashCode());
        Object $first = this.getFirst();
        result1 = result * 59 + ($first == null ? 43 : $first.hashCode());
        Object $answer = this.getAnswer();
        result1 = result * 59 + ($answer == null ? 43 : $answer.hashCode());
        return result1;
    }

    public String toString() {
        return "ImportDetail(type=" + this.getType() + ", details=" + this.getDetails() + ", state=" + this.getState() + ", error=" + this.getError() + ", header=" + this.getHeader() + ", path=" + this.getPath() + ", section=" + this.getSection() + ", first=" + this.getFirst() + ", answer=" + this.getAnswer() + ")";
    }
}
